// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store';
import VueAxios from 'vue-axios';
import axios from './router/axios';
import './permission'; // 权限

/*import { loadStyle } from './util/util';
import { iconfontUrl, iconfontVersion } from '@/config/env';

iconfontVersion.forEach(ele => {
  loadStyle(iconfontUrl.replace('$key', ele));
});*/

//elment-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//共用css
import './styles/common.scss';

//配置文件信息
import * as urls from '@/config/env';
//循环加入
Object.keys(urls).forEach(key => {
  Vue.prototype[key] = urls[key];
});

Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.use(VueAxios, axios);

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
